namespace TestProject1;

public class UnitTest1
{
    /// <summary>
    /// 输出日志
    /// </summary>
    private readonly ITestOutputHelper Output;

    private readonly BasEnumService _service;//需测试的服务

    //基于furion框架实现构造函数注入
    public UnitTest1(ITestOutputHelper tempOutput, SqlSugarRepository<BasEnum> repository, SysCacheService sysCacheService)
    {
        Output = tempOutput;

        //构造服务实例
        _service = new BasEnumService(repository, sysCacheService);
    }


    [Fact]
    public async Task Test1()
    {
        var obj = await _service.All();
        Assert.Equal(2, 1 + 1);
    }


    [Fact]
    public async Task 测试请求百度()
    {
        var rep = await "https://www.baidu.com".GetAsync();
        Assert.True(rep.IsSuccessStatusCode);
    }
}